package com.gangquan360.smartadmin.module.customer.dao;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.gangquan360.smartadmin.module.customer.domain.dto.CustomerDTO;
import com.gangquan360.smartadmin.module.customer.domain.dto.CustomerQueryDTO;
import com.gangquan360.smartadmin.module.customer.domain.entity.CustomerEntity;

/**
 * [ 客户表 ]
 *
 * @author wiggin
 * @version 1.0
 * @company wiggin
 * @copyright (c) 2018 wigginInc. All rights reserved.
 * @date 2020-03-08 21:09:45
 * @since JDK1.8
 */
@Mapper
@Component
public interface CustomerDao extends BaseMapper<CustomerEntity> {

	/**
	 * 分页查询
	 * 
	 * @param queryDTO
	 * @return CustomerEntity
	 */
	List<CustomerEntity> queryByPage(Pagination page, @Param("queryDTO") CustomerQueryDTO queryDTO);

	/**
	 * 根据id删除
	 * 
	 * @param id
	 * @return
	 */
	void deleteById(@Param("id") Long id);

	/**
	 * 批量删除
	 * 
	 * @param idList
	 * @return
	 */
	void deleteByIds(@Param("idList") List<Long> idList);

	/**
	 * 获取客户的所有信息
	 * 
	 * @param id
	 */
	CustomerDTO getAllDetail(@Param("id") Long id);
}
